<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <style>
        .box{
            width:200px;
            height:200px;
            background: rgb(134, 97, 97);
        }
        
    </style>
</head>
<body>
    <div id="app">
       <ul>
           <li v-for="fruit in arr">
               {{ fruit }}
           </li>
       </ul>
       <hr>
       <ul>
           <li v-for="(fruit,index) in arr">
               {{index}}  =>
               {{ fruit }}
           </li>
       </ul>
       <hr>
       循环json
       <ul>
           <li v-for="el in json">
               {{ el }}
           </li>
       </ul>
       <hr>
       <ul>
        <li v-for="(el,key,index) in json">
            {{ key }}
            =>
            {{ index }}
            =>
            {{ el }}
        </li>
    </ul>
    </div>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{
                arr:['香蕉','苹果','梨子','菠萝'],
                json:{
                    name:'小明',
                    age:18,
                    gender:0 // 0男  1女
                }
            }
        })
    </script>
</body>
</html>